<?php
/**
 * mysql�������
 * author:chrisxu
 * date:2011-05-22
 */
include_once( '../drivers/mysql.php' );
include_once( 'config.php' );
$table = 't10w';//���ĸ����������

$value = array( 'title' => 'testtest', 'nid'=>mt_rand(0, 100000) );

//db connect
extract($db_mysql);
$db = new mysql ($host, $user, $password, $dbname );

//start time
list($usec, $sec)  =  explode( " ", microtime() );
$start_time = (float)$usec + (float)$sec;

//$result = $db->insert( $value, $table );

//end time
list($usec, $sec)  =  explode( " ", microtime() );
$end_time = (float)$usec + (float)$sec;

$time = ( $end_time - $start_time ) * 10000;

file_put_contents('logs/insert_mysql_'.$table.'.log', "\n	$start_time	$end_time	".$time, FILE_APPEND);
?>